/*
 * OperationLayer.cpp
 *
 *  Created on: 2010-12-15
 *      Author: wenjian
 */

#include "OperationLayer.h"

namespace S {

  OperationLayer::OperationLayer(WorkPage* page):Ed::Layer(page) {
    ilMergerRadio = new RadioButton(10, 10);
    blMergerRadio = new RadioButton(10, 15+24);
    tblMergerRadio = new RadioButton(10, 20+48);
    addElement(ilMergerRadio);
    addElement(blMergerRadio);
    addElement(tblMergerRadio);
    radioGroup.addRadio(ilMergerRadio);
    radioGroup.addRadio(blMergerRadio);
    radioGroup.addRadio(tblMergerRadio);
    ilMergerRadio->setChecked(true);
    radioListener = new RadioListener(this, page);
    ilMergerRadio->addListener(MouseEvent::PressType, radioListener);
    blMergerRadio->addListener(MouseEvent::PressType, radioListener);
    tblMergerRadio->addListener(MouseEvent::PressType, radioListener);

    //Label* ilLabel;
    //Label* blLabel;
    //Label* tblLabel;
    ilLabel = new Label(35, 10, 200, 25, L"带透明度效果的层合并模式"); //ImageLayerMerger
    blLabel = new Label(35, 39, 200, 25, L"无透明效果的层合并模式"); //BitbltLayerMerger
    tblLabel = new Label(35,67, 200, 25, L"可指定一种透明色的层合并模式"); //TransparentBitbltLayerMerger
    addElement(ilLabel);
    addElement(blLabel);
    addElement(tblLabel);
  }

  OperationLayer::~OperationLayer() {
    delete ilMergerRadio;
    delete blMergerRadio;
    delete tblMergerRadio;
    delete radioListener;

    delete ilLabel;
    delete blLabel;
    delete tblLabel;
  }

}
